package com.micro.frog.rbac.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.micro.frog.rbac.entity.DictClassDO;
import com.micro.frog.rbac.mapper.DictClassMapper;
import com.micro.frog.rbac.service.DictClassService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author :  ljh
 * @date : 2018/4/11
 **/
@Service
public class DictClassServiceImpl extends ServiceImpl<DictClassMapper, DictClassDO> implements DictClassService {

    @Override
    public List<DictClassDO> queryPage(DictClassDO queryVO) {
        QueryWrapper<DictClassDO> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_deleted", "N");
        return this.list(queryWrapper);
    }

    @Override
    public boolean delete(Long id) {
        DictClassDO dictClass = new DictClassDO();
        dictClass.setId(id);
        dictClass.setIsDeleted("Y");
        return this.updateById(dictClass);
    }
}
